package cn.stylefeng.guns.modular.wxapi.banner;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.banner.model.params.BannerParam;
import cn.stylefeng.guns.modular.banner.service.BannerService;
import cn.stylefeng.roses.kernel.model.response.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 微信小程序前端banner接口
 *
 * @author lauyang
 * @Date 2020-04-18 10:38:17
 */
@Api(tags="banner接口")
@Controller
@RequestMapping("wxapi/banner")
public class wxBannerController {

    @Autowired
    private BannerService bannerService;

    @ApiOperation("获取banner列表")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "moduleName", value = "模块名称", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "bizChName", value = "业务名称", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "bizEnName", value = "业务英文名称", required = true, dataType = "String"),
//            @ApiImplicitParam(name = "path", value = "项目生成类路径", required = true, dataType = "String")
//    })
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public LayuiPageInfo list(BannerParam bannerParam) {
        return this.bannerService.findPageBySpec(bannerParam);
    }

}
